package StateMachine;

public enum StatesEnum {
	INITIALIZE {
		// Set up environment
		@Override
		public StatesEnum nextState(String message){
			// TODO
			return MEASURE_OX;
		}
	},
	
	MEASURE_OX {
		 // Pulse LED1, record
		@Override
		public StatesEnum nextState(String message){
			// TODO
			return MEASURE_DEOX;
		}
	},
	
	MEASURE_DEOX {
		// Pulse LED2, record
		@Override
		public StatesEnum nextState(String message){
			// TODO
			return CALCULATE;
		}
	},
	
	CALCULATE {
		// Process results
		@Override
		public StatesEnum nextState(String message){
			// TODO
			return DRAW;
		}
	},
	
	DRAW {
		// Refresh screen
		@Override
		public StatesEnum nextState(String message){
			// TODO
			return MEASURE_OX;
		}
	},
	
	SHUTDOWN {
		// Release environment, shut down gracefully
		@Override
		public StatesEnum nextState(String message){
			// TODO
			return SHUTDOWN;
		}
	},
	
	EXCEPTION {
		// Handle shit
		@Override
		public StatesEnum nextState(String message){
			// TODO
			return INITIALIZE;
		}
	};


public abstract StatesEnum nextState(String message);
}